package com.polly.esphwevent.event;

import com.polly.esphwevent.common.disruptor.HomeworkEvent;
import lombok.extern.slf4j.Slf4j;

import java.util.concurrent.TimeUnit;


@Slf4j
public class AssessmentRespondenceEvent extends HomeworkEvent implements HomeworkEventExecutor {

    public AssessmentRespondenceEvent(String homeworkId,long userId){
        this.setUserId(userId);
        this.setHomeworkId(homeworkId);
        this.setEventType(HomeworkEventType.RESPONDENCE_EVENT);
    }

    @Override
    public void execute() {
        log.info("接收到作答事件：{}",this.getHomeworkId());
        try {
            TimeUnit.SECONDS.sleep(2);
        } catch (InterruptedException e) {

        }
    }


}
